<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="css/jquery.mobile-1.4.2.min.css" />
<link rel="stylesheet" type="text/css" href="css/mobiscrollcss/mobiscroll.custom-2.6.2.min.css">
<link rel="stylesheet" type="text/css" href="css/jkcss.css">

<script src="js/mobiscroll.custom-2.6.2.min.js"></script>
<script type="text/javascript" src="js/lib/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/JKLogin.js"></script>
<script type="text/javascript" src="js/JKCheckForm.js"></script>
<script type="text/javascript" src="js/JKFunc.js"></script>
<script type="text/javascript" src="js/JKRegister.js"></script>
<script type="text/javascript" src="js/lib/jquery.mobile-1.4.2.min.js"></script>
<script type="text/javascript">
var storage;
var shopId;
var shopAdminId;
var loginName;
var telArr;
window.onload = function(){
	storage = window.localStorage;
	window.telArr = new Array(storage.getItem("telPhones"));
	window.shopId = storage.getItem("shopid");
	if(window.shopId==null){
	top.location="index.html";
	}
	window.shopAdminId = storage.getItem("shopAdminId");
	loginName = storage.getItem("LoginName");
	if("undefined" != typeof (mobile)){
		mobile.login(loginName);
	}
	getLastTime();
	getTodayOrder();
}
function getLastTime(){
	JKjsonP({
			ws:"merchants/getLastTime",
			parameter:{shopId:window.shopId},
			sFunc:function(json){
				if (json.result=="success"){
					var lastTime = json.data.lastTime;
					var serverTime = json.data.serverTime;
					$("#lastTime62").html(lastTime);
					var last = new Date(lastTime);
					var now = new Date(serverTime);
					if(last.getTime()-now.getTime() < 0){
						alert("您的使用期限已过，请续费后继续使用");
						localStorage.clear();
						localStorage.setItem("telPhones",window.telArr);
						window.location="index.html";
					}else if(last.getTime()-now.getTime() <= 259200000){
						alert("您的使用期限还剩下不到"+((last.getTime()-now.getTime())/86400000).toFixed(0)+"天，过期后将不能使用此软件，请及时续费");
					}
					}
			},
			eFunc:function(XMLHttpRequest, textStatus, emessage){
				JKPprompt("#popup14",emessage);
			}
		});
}

function getTodayOrder(){
	$(".orderList31").remove();
	$("#status3_1_1").css("display","none");$("#status3_1_2").css("display","none");$("#status3_1_3").css("display","none");$("#status3_1_4").css("display","none");$("#status3_1_5").css("display","none");$("#status3_1_6").css("display","none");$("#status3_1_7").css("display","none");
	JKjsonP({
			ws:"merchants/listTodayOrder",
			parameter:{shopId:window.shopId},
			sFunc:function(json){
				if(json.result=="success"){
					for(var i = 0;i<json.data.length;i++){
					var orderId = json.data[i].orderId;
					var shipTime = json.data[i].shipStartTime+"-"+json.data[i].shipEndTime;
					var address = json.data[i].address;
					var status = json.data[i].status;
					var totalPrice = json.data[i].totalPrice;
					var order = "";
					if(status == "1"){
					order = '<li class = "orderList31" ><a onClick="go311(this.id)" id="'+orderId+'" data-transition="slide"><p>到货时间：'+shipTime+'</p><p>预计'+totalPrice+'元</p><p>到货地址：'+address+'</p></a></li>';
					
					}else if(status=="5"){
					order = '<li class = "orderList31" ><a onClick="go316(this.id)" id="'+orderId+'" data-transition="slide"><p>到货时间：'+shipTime+'</p><p>预计'+totalPrice+'元</p><p>到货地址：'+address+' </p></a></li>';
					}else{
					order = '<li class = "orderList31" ><a onClick="go312(this.id)" id="'+orderId+'" data-transition="slide"><p>到货时间：'+shipTime+'</p><p>总计'+totalPrice+'元</p><p>到货地址：'+address+' </p></a></li>';
					}
					$(order).insertAfter($("#status3_1_"+status)); 
					$("#status3_1_"+status).css("display","block");
					}
					
					$("#page_3_1 ul").listview();
					$("#page_3_1 ul").listview("refresh");
					$.mobile.changePage("#page_3_1",{transition:"slide"});
				}
				
			},
			eFunc:function(XMLHttpRequest, textStatus, emessage){
				alert(emessage);
			}
		});		
}

var anticipatedPrice = 0;
function go311(id){
	$("#no311").attr("hidden",true);
	 $("#orderFruitList311 *").remove();
	JKjsonP({
			ws:"merchants/getOrderDetail",
			parameter:{orderId:id},
			sFunc:function(json){
				if(json.result=="success"){
					$("#orderId311").val(id);
					var dateCreated = "下单时间："+json.data.dateCreated;
					$("#dateCreated311").html(dateCreated);
					var orderNo = json.data.orderNo;
					$("#orderNo311").html(orderNo);
					var mobilePhone = "手机号："+json.data.mobilePhone;
					$("#mobilePhone311").html(mobilePhone);
					var address = "到货地址："+json.data.address;
					$("#address311").html(address);
					var arrivalTime = "到货时间："+json.data.arrivalStartTime+"-"+json.data.arrivalEndTime;
					$("#arrivalTime311").html(arrivalTime);
					var fruitTotalPrice = "预估水果"+json.data.fruitTotalPrice+"元";
					$("#fruitTotalPrice311").html(fruitTotalPrice);
					var totalPrice = "预计："+json.data.totalPrice+"元";
					$("#totalPrice311").html(totalPrice);
					var shipPrice = "运费"+json.data.shipPrice+"元";
					$("#shipPrice311").html(shipPrice);
					var customerOrderFail = "发货后交易失败率"+json.data.customerOrderFail;
					$("#customerOrderFail311").html(customerOrderFail);
					var limitFlag = json.data.limitFlag;
					if(limitFlag){
						$("#no311").attr("hidden",false);
						window.anticipatedPrice = json.data.fruitTotalPrice;
					}
					var status = json.data.status;
					switch(status){
						case 1:
						status = "未处理";
						break;
						case 2:
						status = "已配货";
						break;
						case 3:
						status = "送货中";
						break;
						case 4:
						status = "已到货";
						break;
						case 5:
						status = "拒绝发货";
						break;
						case 6:
						status = "拒收";
						break;
						case 7:
						status = "已撤单";
						break;
					}
					$("#status311").html(status);
					
					for(var i = 0;i<json.data.fruits.length;i++){
						var orderDetailId = json.data.fruits[i].orderDetailId;
						var fruitId = json.data.fruits[i].fruitId;
						var fruitName = json.data.fruits[i].fruitName;
						var quantity = json.data.fruits[i].quantity;
						var util = json.data.fruits[i].util;
						var comment = json.data.fruits[i].comment;
						
						
      var fruit311 = '<br><div class="ui-grid-c" style="width:300px"><div class="ui-block-a" style="margin-top:10px;width:auto" > <span>'+fruitName+'</span>&nbsp;&nbsp;<span>'+quantity+util+'</span></div><div class="ui-block-a" style="margin-top:10px"><label for="fruitpice11" style="font-size:15px">价格：</label></div><div class="ui-block-c" style="width:70px;margin-left:-20px"><input type="text" id="'+orderDetailId+'" class="fruitpice311"></div><div class="ui-block-d" style="margin-top:10px;margin-left:20px" > <span>元</span> </div></div><span >要求：'+comment+'</span><br>';
	  $("#orderFruitList311").append(fruit311);
	  $("#page_3_1_1 div").trigger("create");
					}
				}
			},
			eFunc:function(XMLHttpRequest, textStatus, emessage){
				alert(emessage);
			}
		});		
	$.mobile.changePage("#page_3_1_1",{transition:"slide"});
}
function go312(id){
	$("#no312").attr("hidden",true);
	$("#orderFruitList312 *").remove();
	JKjsonP({
			ws:"merchants/getOrderDetail",
			parameter:{orderId:id},
			sFunc:function(json){
				if(json.result=="success"){
					$("#orderId312").val(id);
					var dateCreated = "下单时间："+json.data.dateCreated;
					$("#dateCreated312").html(dateCreated);
					var orderNo = json.data.orderNo;
					$("#orderNo312").html(orderNo);
					var mobilePhone = "手机号："+json.data.mobilePhone;
					$("#mobilePhone312").html(mobilePhone);
					var address = "到货地址："+json.data.address;
					$("#address312").html(address);
					var arrivalTime = "到货时间："+json.data.arrivalStartTime+"-"+json.data.arrivalEndTime;
					$("#arrivalTime312").html(arrivalTime);
					var fruitTotalPrice = "水果"+json.data.fruitTotalPrice+"元";
					$("#fruitTotalPrice312").html(fruitTotalPrice);
					var totalPrice = "总计："+json.data.totalPrice+"元";
					$("#totalPrice312").html(totalPrice);
					var shipPrice = "运费"+json.data.shipPrice+"元";
					$("#shipPrice312").html(shipPrice);
					var customerOrderFail = "发货后交易失败率"+json.data.customerOrderFail;
					$("#customerOrderFail312").html(customerOrderFail);
					var limitFlag = json.data.limitFlag;
					if(limitFlag){
						$("#no312").attr("hidden",false);
					}
					var status = json.data.status;
					switch(status){
						case 1:
						status = "未处理";
						break;
						case 2:
						status = "已配货";
						break;
						case 3:
						status = "送货中";
						break;
						case 4:
						status = "已到货";
						break;
						case 5:
						status = "拒绝发货";
						break;
						case 6:
						status = "拒收";
						break;
						case 7:
						status = "已撤单";
						break;
					}
					$("#status312").html(status);
					
					for(var i = 0;i<json.data.fruits.length;i++){
						var orderDetailId = json.data.fruits[i].orderDetailId;
						var fruitId = json.data.fruits[i].fruitId;
						var fruitName = json.data.fruits[i].fruitName;
						var quantity = json.data.fruits[i].quantity;
						var util = json.data.fruits[i].util;
						var totalPrice = json.data.fruits[i].totalPrice;
						var comment = json.data.fruits[i].comment;
						
						
      var fruit312 = '<br><div class="ui-grid-c" style="width:300px"><div class="ui-block-a" style="margin-top:10px;width:auto" > <span>'+fruitName+'</span>&nbsp;&nbsp;<span>'+quantity+util+'</span></div> <div class="ui-block-a" style="margin-top:10px;width:auto"> 价格：'+totalPrice+'元</div></div><span >要求：'+comment+'</span><br>';
	  $("#orderFruitList312").append(fruit312);
	  $("#page_3_1_2 div").trigger("create");
					}
				}
			},
			eFunc:function(XMLHttpRequest, textStatus, emessage){
				alert(emessage);
			}
		});	
$.mobile.changePage("#page_3_1_2",{transition:"slide"});
}
function go316(id){
	$("#no316").attr("hidden",true);
	$("#orderFruitList316 *").remove();
	JKjsonP({
			ws:"merchants/getOrderDetail",
			parameter:{orderId:id},
			sFunc:function(json){
				if(json.result=="success"){
					$("#orderId316").val(id);
					var dateCreated = "下单时间："+json.data.dateCreated;
					$("#dateCreated316").html(dateCreated);
					var orderNo = json.data.orderNo;
					$("#orderNo316").html(orderNo);
					var mobilePhone = "手机号："+json.data.mobilePhone;
					$("#mobilePhone316").html(mobilePhone);
					var address = "到货地址："+json.data.address;
					$("#address316").html(address);
					var arrivalTime = "到货时间："+json.data.arrivalStartTime+"-"+json.data.arrivalEndTime;
					$("#arrivalTime316").html(arrivalTime);
					var fruitTotalPrice = "预估水果"+json.data.fruitTotalPrice+"元";
					$("#fruitTotalPrice316").html(fruitTotalPrice);
					var totalPrice = "预计："+json.data.totalPrice+"元";
					$("#totalPrice316").html(totalPrice);
					var shipPrice = "运费"+json.data.shipPrice+"元";
					$("#shipPrice316").html(shipPrice);
					var customerOrderFail = "发货后交易失败率"+json.data.customerOrderFail;
					$("#customerOrderFail316").html(customerOrderFail);
					var limitFlag = json.data.limitFlag;
					if(limitFlag){
						$("#no316").attr("hidden",false);
					}
					var status = json.data.status;
					switch(status){
						case 1:
						status = "未处理";
						break;
						case 2:
						status = "已配货";
						break;
						case 3:
						status = "送货中";
						break;
						case 4:
						status = "已到货";
						break;
						case 5:
						status = "拒绝发货";
						break;
						case 6:
						status = "拒收";
						break;
						case 7:
						status = "已撤单";
						break;
					}
					$("#status316").html(status);
					
					for(var i = 0;i<json.data.fruits.length;i++){
						var orderDetailId = json.data.fruits[i].orderDetailId;
						var fruitId = json.data.fruits[i].fruitId;
						var fruitName = json.data.fruits[i].fruitName;
						var quantity = json.data.fruits[i].quantity;
						var util = json.data.fruits[i].util;
						var totalPrice = json.data.fruits[i].totalPrice;
						var comment = json.data.fruits[i].comment;
						
						
      var fruit316 = '<br><div class="ui-grid-c" style="width:300px"><div class="ui-block-a" style="margin-top:10px;width:auto" ><span>'+fruitName+'</span>&nbsp;&nbsp;<span>'+quantity+util+'</span> <div class="ui-block-a" style="margin-top:10px;width:auto"> 价格：'+totalPrice+'元</div></div><span >要求：'+comment+'</span><br>';
	  $("#orderFruitList316").append(fruit316);
	  $("#page_3_1_6 div").trigger("create");
					}
				}
			},
			eFunc:function(XMLHttpRequest, textStatus, emessage){
				alert(emessage);
			}
		});	
$.mobile.changePage("#page_3_1_6",{transition:"slide"});
}
</script>
</head>

<body>
<div id="page_3_1" data-role="page" data-theme="d">
  <div data-role="header">
    <h1 class="ui-corner-all">订单管理</h1>
    <a  class="ui-btn ui-corner-all ui-btn-right"  onClick="panel()" data-transition="slide" style="margin-right:33px; background-color:#55C3F1;margin-top:-2px">菜单</a> </div>
  <div data-role="content">
    <ul data-role="listview" >
      <li data-role="list-divider" id="status3_1_1" style="display:none">
          <h2 style="float:left; margin-right:20px; color:#00CC66">未处理</h2>
      </li>
      <li data-role="list-divider" id="status3_1_2" style="display:none">
          <h2 style="float:left; margin-right:20px; color:#00CC66">已配货</h2>
      </li>
      <li data-role="list-divider" id="status3_1_3" style="display:none">
          <h2 style="float:left; margin-right:20px; color:#00CC66">送货中</h2>
      </li>
      <li data-role="list-divider" id="status3_1_4" style="display:none">
          <h2 style="float:left; margin-right:20px; color:#00CC66">已到货</h2>
      </li>
      <li data-role="list-divider" id="status3_1_5" style="display:none">
          <h2 style="float:left; margin-right:20px; color:#00CC66">拒绝发货</h2>
      </li>
      <li data-role="list-divider" id="status3_1_6" style="display:none">
          <h2 style="float:left; margin-right:20px; color:#00CC66">拒收</h2>
      </li>
      <li data-role="list-divider" id="status3_1_7" style="display:none">
          <h2 style="float:left; margin-right:20px; color:#00CC66">已撤单</h2>
      </li>
      
    </ul>
   
  </div>
  <div data-role="footer" data-position="fixed" style="border:none" data-tap-toggle="false">
  <p align="right" >
  <a class="ui-btn ui-corner-all" onClick="getTodayOrder()" style="background-color:#55C3F1;margin-right:20px">刷新</a>
</p>
</div>
</div>


<div data-role="page" id="page_3_1_1" data-theme="jk">
  <div data-role="header"> <a  class="ui-btn ui-corner-all" data-rel="back" onClick="cleanPrice()" data-icon="back" style="border:none; color:#FFFFFF">返回</a> 
  <a  class="ui-btn ui-corner-all ui-btn-right"  onClick="panel()" data-transition="slide" style="margin-right:33px; color:#FFFFFF">菜单</a>
    <h1 class="ui-corner-all">订单管理</h1>
  </div>
  <div data-role="content">
    <div class="ui-grid-a" >
    <input type="hidden" id="orderId311"/>
       <div class="ui-block-a" style="font-size:15px;width:auto" >
        <p style="font-size:18px" id="dateCreated311"></p>
      </div>
      <div class="ui-block-b" align="right" style="margin-left:-30px">
        <p style="font-size:18px;margin-right:10px" id="status311"></p>
      </div>
      <div class="ui-block-a" style="font-size:15px;width:auto" >
        <p ><span>订单号：</span><span id="orderNo311"></span></p>
      </div>
      <div class="ui-block-a" style="font-size:15px;width:auto;margin-top:-30px" >
        <p id="arrivalTime311"></p>
      </div>
      <div class="ui-block-a" style="font-size:15px;width:auto;margin-top:-30px" >
        <p id="mobilePhone311"></p>
      </div>
      <div class="ui-block-a" style="font-size:15px;width:auto;margin-top:-30px" >
        <p id="address311"></p>
      </div>
    </div>
    <hr>
    <div id="no311" hidden="true" style="color:#F00">实际价格不超过预计价格</div>
    <div id="orderFruitList311" style="font-size:15px">
     
        
</div>      
       <br>
      <br>
      <span id="fruitTotalPrice311"></span> <br>
      <span id="shipPrice311"></span> <br>
      <span id="totalPrice311"></span> <br>
      <span id="customerOrderFail311"></span> <br>
    <div class="ui-grid-a">
      <div class="ui-block-a"> <a class="ui-btn ui-corner-all" onClick="acceptOrder()">接受</a> </div>
      <div class="ui-block-b"> <a class="ui-btn ui-corner-all" data-rel="popup" href="#refuse">拒绝</a> </div>
    </div>
  </div>
  <div data-role="popup" id="refuse" data-theme="b">
  	<div data-role="content">
    <p>确定拒绝？</p>
    <div class="ui-grid-a">
      <div class="ui-block-a"> <a class="ui-btn ui-corner-all" onClick="refuseOrder()">确定</a> </div>
      <div class="ui-block-b"> <a class="ui-btn ui-corner-all" data-rel="back">返回</a> </div>
    </div>
    </div>
  </div>
</div>
<script type="text/javascript">
function cleanPrice(){
window.anticipatedPrice = 0;
}

function acceptOrder(){
	var realPrice = 0;
	var orderId = $("#orderId311").val();
	var fruits = "[";
	var items = $(".fruitpice311");
	for(var i = 0;i<items.length;i++){
		var detailId = items[i].id;
		var totalPrice = $(items[i]).val();
		realPrice += totalPrice;
		if(totalPrice ==""){
			$(items[i]).focus().select();
			return ;
		}else{
			fruits += '{"detailId":"'+detailId+'","totalPrice":'+totalPrice+'},';
		}
	}
	fruits = fruits.substring(0,fruits.length-1)
	fruits +="]";
	if(window.anticipatedPrice!=0&&realPrice > window.anticipatedPrice){
		alert("实际价格超过预计价格，请重新填写");
	}else{
	JKjsonP({
			ws:"merchants/acceptOrder",
			parameter:{orderId:orderId, fruits:fruits},
			sFunc:function(json){
				
				if(json.result=="success"){
					getTodayOrder();
					window.anticipatedPrice = 0;
				}else{
				alert(json.msg);
				}
				
			},
			eFunc:function(XMLHttpRequest, textStatus, emessage){
				alert(emessage);
			}
		});	
	}
}

function refuseOrder() {
var orderId = $("#orderId311").val();
JKjsonP({
			ws:"merchants/refuseOrder",
			parameter:{orderId:orderId},
			sFunc:function(json){
				
				if(json.result=="success"){
					getTodayOrder();
				}else{
				alert(json.msg);
				}
				
			},
			eFunc:function(XMLHttpRequest, textStatus, emessage){
				alert(emessage);
			}
		});		
}
</script>

<div data-role="page" id="page_3_1_2" data-theme="jk">
  <div data-role="header"> <a  class="ui-btn ui-corner-all" data-rel="back" data-icon="back">返回</a> <a  class="ui-btn ui-corner-all ui-btn-right"  onClick="panel()" data-transition="slide" style="margin-right:33px">菜单</a>
    <h1 class=" ui-corner-all">订单管理</h1>
  </div>
  <div data-role="content">
    <div class="ui-grid-a" >
    <input type="hidden" id="orderId312"/>
       <div class="ui-block-a" style="font-size:15px;width:auto" >
        <p style="font-size:18px" id="dateCreated312"></p>
      </div>
      <div class="ui-block-b" align="right" style="margin-left:-30px">
        <p style="font-size:18px;margin-right:10px" id="status312"></p>
      </div>
      <div class="ui-block-a" style="font-size:15px;width:auto" >
        <p ><span>订单号：</span><span id="orderNo312"></span></p>
      </div>
      <div class="ui-block-a" style="font-size:15px;width:auto;margin-top:-30px" >
        <p id="arrivalTime312"></p>
      </div>
      <div class="ui-block-a" style="font-size:15px;width:auto;margin-top:-30px" >
        <p id="mobilePhone312"></p>
      </div>
      <div class="ui-block-a" style="font-size:15px;width:auto;margin-top:-30px" >
        <p id="address312"></p>
      </div>
    </div>
    <hr>
    <div id="no312" hidden="true" style="color:#F00">实际价格不超过预计价格</div>
    <div id="orderFruitList312" style="font-size:15px">
     
        
</div>      
       <br>
      <br>
     <span id="fruitTotalPrice312"></span> <br>
      <span id="shipPrice312"></span> <br>
      <span id="totalPrice312"></span> <br>
      <span id="customerOrderFail312"></span>  <br>
    </div>
  </div>
</div>
<div data-role="page" id="page_3_1_6" data-theme="jk">
  <div data-role="header"> <a  class="ui-btn ui-corner-all" data-rel="back" data-icon="back" style="color:#FFFFFF">返回</a> <a  class="ui-btn ui-corner-all ui-btn-right"  onClick="panel()" data-transition="slide" style="margin-right:33px">菜单</a>
    <h1 class="ui-corner-all">订单管理</h1>
  </div>
  <div data-role="content">
    <div class="ui-grid-a" >
    <input type="hidden" id="orderId316"/>
       <div class="ui-block-a" style="font-size:15px;width:auto" >
        <p style="font-size:18px" id="dateCreated316"></p>
      </div>
      <div class="ui-block-b" align="right" style="margin-left:-30px">
        <p style="font-size:18px;margin-right:10px" id="status316"></p>
      </div>
      <div class="ui-block-a" style="font-size:15px;width:auto" >
        <p ><span>订单号：</span><span id="orderNo316"></span></p>
      </div>
      <div class="ui-block-a" style="font-size:15px;width:auto;margin-top:-30px" >
        <p id="arrivalTime316"></p>
      </div>
      <div class="ui-block-a" style="font-size:15px;width:auto;margin-top:-30px" >
        <p id="mobilePhone316"></p>
      </div>
      <div class="ui-block-a" style="font-size:15px;width:auto;margin-top:-30px" >
        <p id="address316"></p>
      </div>
    </div>
    <hr>
    <div id="no316" hidden="true" style="color:#F00">实际价格不超过预计价格</div>
    <div id="orderFruitList316" style="font-size:15px">
     
        
</div>      
       <br>
      <br>
     <span id="fruitTotalPrice316"></span> <br>
      <span id="shipPrice316"></span> <br>
      <span id="totalPrice316"></span> <br>
      <span id="customerOrderFail316"></span>  <br>
    <p align="center"><a class="ui-btn ui-shadow ui-corner-all " onClick="recoverOrder()">恢复发货</a></p>
  </div>
</div>
<script type="text/javascript">
function recoverOrder(){
	var orderId = $("#orderId316").val();
JKjsonP({
			ws:"merchants/recoverOrder",
			parameter:{orderId:orderId},
			sFunc:function(json){
				
				if(json.result=="success"){
					getTodayOrder();
				}else{
				alert(json.msg);
				}
				
			},
			eFunc:function(XMLHttpRequest, textStatus, emessage){
				alert(emessage);
			}
		});		
}
</script>

<div data-role="panel" id="leftpanel" data-position="right" data-display="reveal" data-theme="jk">
	<ul data-role="listview">
      <li><a href="#page_3_1" data-transition="slide" class="ui-btn" onClick="javascript:samePageID('#page_3_1');" style="background-color:#54c3f1;color:#FFFFFF">订单管理</a></li>
     <li><a  class="ui-btn"  style="background-color:#54c3f1;color:#FFFFFF" onClick="reLogin()">退出</a></li>
    </ul>
</div>
<script>
function reLogin(){
	storage.clear();
	localStorage.setItem("telPhones",window.telArr);
	top.location="index.html";
	}
	
	var currentPageID = "#page_3_1";
	$(function() {
		$(document).on("swipeleft", function(event){
			$( "#leftpanel" ).panel( "open" );
		});
		$(document).on("swiperight", function(event){
			$( "#leftpanel" ).panel( "close" );
		});
	});
	function samePageID(newPageID){
		if(currentPageID == newPageID) {
			$(":jqmData(role='panel')").panel('close');
		}else{
			currentPageID = newPageID;
		}
	}
	 function panel(){
	if($("#leftpanel").open){
		$( "#leftpanel" ).panel( "close" );
	}else{
	$( "#leftpanel" ).panel( "open" );
	}
}   
		
</script>
<script id="panel-init">
		$(function() {
			$( "body>[data-role='panel']" ).panel();
		});
	</script>

</body>
</html>
